﻿using System;

namespace HalconDotNet
{
	// Token: 0x0200008F RID: 143
	internal class HTupleElementsImplementation
	{
		// Token: 0x06001ECB RID: 7883 RVA: 0x000B80E5 File Offset: 0x000B62E5
		public HTupleElementsImplementation()
		{
			this.source = null;
			this.indices = new int[0];
		}

		// Token: 0x06001ECC RID: 7884 RVA: 0x000B8100 File Offset: 0x000B6300
		public HTupleElementsImplementation(HTupleImplementation source, int index)
		{
			this.source = source;
			this.indices = new int[]
			{
				index
			};
		}

		// Token: 0x06001ECD RID: 7885 RVA: 0x00020D0B File Offset: 0x0001EF0B
		public virtual void Dispose()
		{
		}

		// Token: 0x06001ECE RID: 7886 RVA: 0x000B811F File Offset: 0x000B631F
		public HTupleElementsImplementation(HTupleImplementation source, int[] indices)
		{
			this.source = source;
			this.indices = indices;
		}

		// Token: 0x06001ECF RID: 7887 RVA: 0x000B8135 File Offset: 0x000B6335
		public int[] getIndices()
		{
			return this.indices;
		}

		// Token: 0x17000082 RID: 130
		// (get) Token: 0x06001ED0 RID: 7888 RVA: 0x000B813D File Offset: 0x000B633D
		// (set) Token: 0x06001ED1 RID: 7889 RVA: 0x000B8145 File Offset: 0x000B6345
		public int[] I
		{
			get
			{
				return this.getI();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setI(value);
			}
		}

		// Token: 0x17000083 RID: 131
		// (get) Token: 0x06001ED2 RID: 7890 RVA: 0x000B815F File Offset: 0x000B635F
		// (set) Token: 0x06001ED3 RID: 7891 RVA: 0x000B8167 File Offset: 0x000B6367
		public long[] L
		{
			get
			{
				return this.getL();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setL(value);
			}
		}

		// Token: 0x17000084 RID: 132
		// (get) Token: 0x06001ED4 RID: 7892 RVA: 0x000B8181 File Offset: 0x000B6381
		// (set) Token: 0x06001ED5 RID: 7893 RVA: 0x000B8189 File Offset: 0x000B6389
		public double[] D
		{
			get
			{
				return this.getD();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setD(value);
			}
		}

		// Token: 0x17000085 RID: 133
		// (get) Token: 0x06001ED6 RID: 7894 RVA: 0x000B81A3 File Offset: 0x000B63A3
		// (set) Token: 0x06001ED7 RID: 7895 RVA: 0x000B81AB File Offset: 0x000B63AB
		public string[] S
		{
			get
			{
				return this.getS();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setS(value);
			}
		}

		// Token: 0x17000086 RID: 134
		// (get) Token: 0x06001ED8 RID: 7896 RVA: 0x000B81C5 File Offset: 0x000B63C5
		// (set) Token: 0x06001ED9 RID: 7897 RVA: 0x000B81CD File Offset: 0x000B63CD
		public HHandle[] H
		{
			get
			{
				return this.getH();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setH(value);
			}
		}

		// Token: 0x17000087 RID: 135
		// (get) Token: 0x06001EDA RID: 7898 RVA: 0x000B81E7 File Offset: 0x000B63E7
		// (set) Token: 0x06001EDB RID: 7899 RVA: 0x000B81EF File Offset: 0x000B63EF
		public object[] O
		{
			get
			{
				return this.getO();
			}
			set
			{
				this.source.AssertSize(this.indices);
				this.setO(value);
			}
		}

		// Token: 0x17000088 RID: 136
		// (get) Token: 0x06001EDC RID: 7900 RVA: 0x000B8209 File Offset: 0x000B6409
		public HTupleType Type
		{
			get
			{
				return this.getType();
			}
		}

		// Token: 0x17000089 RID: 137
		// (get) Token: 0x06001EDD RID: 7901 RVA: 0x000B8211 File Offset: 0x000B6411
		public int Length
		{
			get
			{
				return this.indices.Length;
			}
		}

		// Token: 0x06001EDE RID: 7902 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual int[] getI()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EDF RID: 7903 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual long[] getL()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE0 RID: 7904 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual double[] getD()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE1 RID: 7905 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual string[] getS()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE2 RID: 7906 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual HHandle[] getH()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE3 RID: 7907 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual object[] getO()
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE4 RID: 7908 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setI(int[] i)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE5 RID: 7909 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setL(long[] l)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE6 RID: 7910 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setD(double[] d)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE7 RID: 7911 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setS(string[] s)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE8 RID: 7912 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setH(HHandle[] h)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EE9 RID: 7913 RVA: 0x000B821B File Offset: 0x000B641B
		public virtual void setO(object[] o)
		{
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x06001EEA RID: 7914 RVA: 0x000B8228 File Offset: 0x000B6428
		protected bool IsValidArrayForSetX(Array a)
		{
			if (a == null)
			{
				return false;
			}
			if (a.Length != 1 && a.Length != this.indices.Length)
			{
				throw new HTupleAccessException(this.source, "Number of values must be one or match number of indexed elements");
			}
			return true;
		}

		// Token: 0x06001EEB RID: 7915 RVA: 0x000B825A File Offset: 0x000B645A
		public virtual HTupleType getType()
		{
			if (this.indices.Length == 0)
			{
				return HTupleType.EMPTY;
			}
			throw new HTupleAccessException(this.source);
		}

		// Token: 0x0400116C RID: 4460
		protected int[] indices;

		// Token: 0x0400116D RID: 4461
		protected HTupleImplementation source;
	}
}
